package com.jzo2o.customer.controller.agency;

import com.jzo2o.customer.model.domain.ServeBankCard;
import com.jzo2o.customer.model.dto.request.BankAccountUpsertReqDTO;
import com.jzo2o.customer.service.IServeBankCardService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController("agencyServeBankCardController")
@RequestMapping("/agency")
@Api(tags = "服务端 - 服务人员相关接口")
public class ServeBankCardController {

    @Autowired
    IServeBankCardService serveBankCardService;

    @PostMapping("/bank-account")
    public void addBankCard(@RequestBody BankAccountUpsertReqDTO reqDTO){
        serveBankCardService.addBankCard(reqDTO);
    }

    @GetMapping("/bank-account/currentUserBankAccount")
    public ServeBankCard currentUserBankAccount(){
       return serveBankCardService.currentUserBankAccount();
    }
}